import os
import threading
#
# def function(i):
#     print('线程调用函数{}'.format(i))
#     return
#
# threads=[]
# def getfiles():
#     filename=os.listdir(r'C:\Users\Admin\Desktop\readpst')
#     return filename
# # print(getfiles())
#
# for i in getfiles():
#     t=threading.Thread(target=function(i,))
#     threads.append(t)
#     t.start()
#     t.join()

# def getfiles():
#     filename=os.listdir(r'C:\Users\Admin\Desktop\readpst')
#     return filename
# print(getfiles())




if __name__=='__main':
    print('程序开始')
    filename = os.listdir(r'C:\Users\Admin\Desktop\readpst')
    threads=[]
    files=range(len(filename))

    for i in files:
        print("线程：",i)
        t=threading.Thread(target=(files[i]))
        threads.append(t)

    for i in files:
        